package com.example.auv_660.auvorderload;

import com.example.auv_660.autocontrolalgorithm.AutoControlGPS;
import com.example.auv_660.autocontrolalgorithm.Context;
import com.example.auv_660.util.Constants;

public class StartAutoControlGPSLoad extends OrderLoad {
    @Override
    public void doOrder(String order) {
        if (order.contains(Constants.START_AUTO_CONTROL_GPS))
        {
            Context context = new Context(new AutoControlGPS());
            context.executeStrategy(order);
            return;
        }
        else
        {
            OrderLoad nexOrder = this.getNextOrder();
            if (nexOrder != null)
            {
                nexOrder.doOrder(order);
            }
        }
    }
}
